<template>
  <div>
    <van-nav-bar
  :title="songsname"
  left-text="返回"
  right-text="按钮"
  left-arrow
  @click-left="$router.back()"
  @click-right="onClickRight"
/>
  正在播放  {{$route.params.id}}

  </div>
</template>

<script>
import { songsdetail } from '@/api/music.js'
export default {
  data () {
    return {
      songsname: ''
    }
  },
  created () {
    this.getsongsdetail(this.$route.params.id)
  },
  methods: {
    onClickRight () {
      console.log('分享成功')
    },
    async getsongsdetail (ids) {
      const res = await songsdetail(ids)

      this.songsname = res.data.songs[0].name
    }
  }
}
</script>

<style>

</style>
